package reflectiontests;

import java.lang.reflect.Constructor;
import java.util.Arrays;

public class TestFrameReflections {

	public static void main(String[] args) throws Exception {
		String s = "branch_access.Manager";
		System.out.println(s);
		System.out.println(s.split("\\u002E").length);
		for(String k : s.split("\\u002E"))
			System.out.println(k);
		
		
		Class<?> c = Class.forName("reflectiontests.BlaStub");
		System.out.println("found class");
		Constructor<?>[] cs = c.getConstructors();
		for(Constructor<?> spec : cs){
			System.out.println(spec.getName() + " - " + Arrays.toString(spec.getParameterTypes()));
			if(spec.getParameterTypes().length == 3){
				Object o = spec.newInstance("localhost!",8080,"horst!");
				System.out.println(o.toString());
			}
		}
		
	}

}
